package com.botann.projects.model;

import javax.persistence.*;

/**
 * cs_erp
 * RoleViewItem
 * Created by 刘山国 on 2018/9/28.
 * Copyright (c) 2017 伯坦科技. All rights reserved
 */
@Entity
@Table(name = "role_view_item", schema = "db_cs_erp", catalog = "")
public class RoleViewItem {
    private int id;
    private int itemId;
    private int roleViewId;
    private boolean showing;
    private boolean clickable;

    @Id
    @Column(name = "id", nullable = false)
    public int getId() {
        return id;
    }

    public void setId(int id) {
        this.id = id;
    }

    @Basic
    @Column(name = "item_id", nullable = false)
    public int getItemId() {
        return itemId;
    }

    public void setItemId(int itemId) {
        this.itemId = itemId;
    }

    @Basic
    @Column(name = "role_view_id", nullable = false)
    public int getRoleViewId() {
        return roleViewId;
    }

    public void setRoleViewId(int roleViewId) {
        this.roleViewId = roleViewId;
    }

    @Basic
    @Column(name = "showing", nullable = false)
    public boolean isShowing() {
        return showing;
    }

    public void setShowing(boolean showing) {
        this.showing = showing;
    }

    @Basic
    @Column(name = "clickable", nullable = false)
    public boolean isClickable() {
        return clickable;
    }

    public void setClickable(boolean clickable) {
        this.clickable = clickable;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RoleViewItem that = (RoleViewItem) o;

        if (id != that.id) return false;
        if (itemId != that.itemId) return false;
        if (roleViewId != that.roleViewId) return false;
        if (showing != that.showing) return false;
        if (clickable != that.clickable) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id;
        result = 31 * result + itemId;
        result = 31 * result + roleViewId;
        result = 31 * result + (showing ? 1 : 0);
        result = 31 * result + (clickable ? 1 : 0);
        return result;
    }
}
